import { post } from "@/packages/http/request.ts";

export const addUser = (userInfo: any) => {
  return post("/user/addUser", userInfo);
};

export const updateUser = (userInfo: any) => {
  return post("/user/updateUser", userInfo, {}, true);
};

export const delUser = ({ uid }: { uid: Array<number | string> }) => {
  return post("/user/delUser", { uid });
};

export const searchUser = (params: any) => {
  return post("/user/searchUser", params, {}, true);
};

export const getUserInfo = (params: any) => {
  return post("/user/userInfo", params);
};

export const userLogin = (params: any) => {
  return post("/user/login", params);
};

export const userRegister = (params: any) => {
  return post("/user/register", params);
};

// 发送验证码
export const sendCode = (params: any): any => {
  return post("/user/sendCode", params);
};
